﻿using ChurchDiary.BLL;
using ChurchDiary.TableEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;

namespace FGPC.Controllers
{
    public class MissionaryArticlesController : Controller
    {
        //
        // GET: /MissionaryArticles/

        public ActionResult Index()
        {
            List<EntityArticle> Articles = new BLL_Website().GetArticle();

            StringBuilder sbArticle = new StringBuilder();
            foreach (EntityArticle Article in Articles)
            {
                sbArticle.Append("<div class='col-md-3 col-sm-6 isotope-item " + Article.ArticleTitle + "'>");
                sbArticle.Append("<div class='image-box'>");
                sbArticle.Append("<div class='overlay-container'>");
                sbArticle.Append("<img src='http://admin.fgpc.in/uploads/Magazine/IndexImages/" + Article.ArticleImage + "' alt=''>");
                sbArticle.Append("</div>");
                sbArticle.Append("<div class='image-box-body'>");
                sbArticle.Append("<h3 class='title'><a href='portfolio-item.html'>" + Article.ArticleTitle + "</a></h3>");
                sbArticle.Append("<p>" + Article.ArticleTitle + "/" + Article.ArticleTitle + "</p>");
                sbArticle.Append("<a target='_blank' href='' class='link'><span>Read More</span></a>");
                sbArticle.Append("</div>");
                sbArticle.Append("</div>");
                sbArticle.Append("</div>");
            }
            ViewBag.vbArticle = sbArticle.ToString();

            ViewBag.Description = "Missionary Articles";
            ViewBag.Authur = "Full Gospel Pentecostal Church";
            return View();
        }

    }
}
